<template>
    <div class="deactivate" ref="labelBox" @click="changeStyle">{{label}}</div>
</template>

<script>
export default {
    props: {
        label: String,
    },
    methods: {
        changeStyle() {
            this.$refs.labelBox.className = this.$refs.labelBox.className === "activate" ? "deactivate" : "activate";
        }
    }
}
</script>

<style lang="less">
.deactivate { 
    display: flex;
    align-items: center;
    justify-self: center;
    height: 20px;
    background-color: #f2f3f5; 
    padding: 1px 10px;
    border-radius: 4px;
    border-color: 1px solid #f2f3f5;  
    margin-left: 5px;
    margin-right: 5px; 
}

.activate {
    display: flex;
    align-items: center;
    justify-self: center;
    height: 20px;
    background-color: #ebf4fd; 
    padding: 1px 10px;
    border-radius: 4px;
    border: 1px solid #007fff;
    color: #007fff;  
    margin-left: 5px;
    margin-right: 5px; 
}
</style>